<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "iliketry.member_info".
 *
 * @property integer $no
 * @property integer $member_no
 * @property string $username
 * @property string $true_name
 * @property string $area
 * @property string $ceng
 * @property string $code
 * @property string $cell
 * @property string $call
 * @property string $add_time
 * @property string $email
 * @property string $have_check
 * @property integer $cell_jh_num
 * @property string $shi
 * @property string $lou
 * @property string $company
 * @property integer $status
 * @property integer $father_member_no
 * @property integer $vip_last_month
 * @property string $is_forbid
 * @property string $school
 * @property integer $city_no
 * @property integer $area_no
 * @property integer $district_no
 * @property string $yx
 * @property string $outsite
 * @property integer $yc
 * @property integer $apply_count
 * @property integer $old_member_activate_time
 * @property integer $province_no
 * @property integer $province_home_no
 * @property integer $city_home_no
 * @property integer $area_home_no
 * @property integer $district_home_no
 * @property string $home_num
 * @property string $home_room
 * @property string $home_ceng
 * @property integer $cuxiaodx_flag
 * @property integer $confirm_user
 * @property integer $gender
 * @property integer $birthyear
 * @property integer $birthmonth
 * @property integer $birthday
 * @property integer $cuxiaoemail_flag
 * @property integer $xiaohaoflag
 * @property integer $register_type
 * @property integer $article_pass_rate
 * @property integer $last_auth_time
 * @property integer $xt_province_no
 * @property integer $xt_city_no
 * @property integer $xt_area_no
 * @property integer $xt_district_no
 * @property string $xt_lou
 * @property string $xt_shi
 * @property string $xt_ceng
 */
class MemberInfo extends \yii\db\ActiveRecord
{

    public static $GENDER_MAN = 1;
    public static $GENDER_FEMALE = 2;
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'iliketry.member_info';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['member_no', 'cell_jh_num', 'status', 'father_member_no', 'vip_last_month', 'city_no', 'area_no', 'district_no', 'yc', 'apply_count', 'old_member_activate_time', 'province_no', 'province_home_no', 'city_home_no', 'area_home_no', 'district_home_no', 'cuxiaodx_flag', 'confirm_user', 'gender', 'birthyear', 'birthmonth', 'birthday', 'cuxiaoemail_flag', 'xiaohaoflag', 'register_type', 'article_pass_rate', 'last_auth_time', 'xt_province_no', 'xt_city_no', 'xt_area_no', 'xt_district_no'], 'integer'],
            //[['username', 'email', 'lou', 'area_no', 'district_no', 'outsite', 'confirm_user', 'gender', 'birthyear', 'birthmonth', 'birthday'], 'required'],
            [['add_time'], 'safe'],
            [['username', 'home_num', 'home_room', 'home_ceng', 'xt_lou', 'xt_shi', 'xt_ceng'], 'string', 'max' => 30],
            [['true_name', 'area', 'ceng', 'code', 'cell', 'call', 'shi', 'company', 'school', 'yx'], 'string', 'max' => 255],
            [['email'], 'string', 'max' => 40],
            [['have_check'], 'string', 'max' => 50],
            [['lou'], 'string', 'max' => 100],
            [['is_forbid'], 'string', 'max' => 1],
            [['outsite'], 'string', 'max' => 10],
            [['member_no'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'no' => 'ID',
            'member_no' => 'Member No',
            'username' => '昵称',
            'true_name' => '真实姓名',
            'area' => '所在地区',
            'ceng' => '层 原adress',
            'code' => '邮编',
            'cell' => '移动电话',
            'call' => '固定电话',
            'add_time' => '添加时间',
            'email' => '邮箱',
            'have_check' => 'Have Check',
            'cell_jh_num' => 'Cell Jh Num',
            'shi' => '室 原字段adress1',
            'lou' => '楼 原字段名adress2',
            'company' => 'Company',
            'status' => '状态,0一般人,1学生',
            'father_member_no' => '父会员id',
            'vip_last_month' => 'VIP还剩余月数量',
            'is_forbid' => '是否禁止',
            'school' => '学校名称',
            'city_no' => '城市id',
            'area_no' => 'Area No',
            'district_no' => 'District No',
            'yx' => '如果是学生，本字段存储院系信息',
            'outsite' => '来源',
            'yc' => 'òì3￡×???,1′ú±íó??§μ??·òì3￡,?????1ó??§éêáìD?2ú?·oíDT??μ??·,??ó|custom_logμ?yc×???è???',
            'apply_count' => '新手特权申领次数',
            'old_member_activate_time' => '老会员激活时间',
            'province_no' => 'Province No',
            'province_home_no' => 'Province Home No',
            'city_home_no' => 'City Home No',
            'area_home_no' => 'Area Home No',
            'district_home_no' => 'District Home No',
            'home_num' => 'Home Num',
            'home_room' => 'Home Room',
            'home_ceng' => 'Home Ceng',
            'cuxiaodx_flag' => 'Cuxiaodx Flag',
            'confirm_user' => '1为认证用户',
            'gender' => '性别',
            'birthyear' => 'Birthyear',
            'birthmonth' => 'Birthmonth',
            'birthday' => 'Birthday',
            'cuxiaoemail_flag' => 'Cuxiaoemail Flag',
            'xiaohaoflag' => 'Xiaohaoflag',
            'register_type' => '1:web注册,2:wap微信网页注册',
            'article_pass_rate' => '心得通过率',
            'last_auth_time' => '同楼打包&发起打包最后验证手机的时间',
            'xt_province_no' => '校推省',
            'xt_city_no' => '校推市',
            'xt_area_no' => '校推区域',
            'xt_district_no' => '校推宿舍（大学名称编号）',
            'xt_lou' => '校推楼',
            'xt_shi' => '校推室',
            'xt_ceng' => '校推层',
        ];
    }

    /**
     * @inheritdoc
     * @return \services\models\MemberInfoQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new \services\models\MemberInfoQuery(get_called_class());
    }
}
